<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
		<!--
			<ul>
				<li><a href="#" class="report">Sales Report</a></li>
				<li><a href="#" class="report_seo">SEO Report</a></li>
				<li><a href="#" class="search">Search</a></li>
				<li><a href="#" class="feed">RSS Feed</a></li>
			</ul>
		-->
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
				<h3>检索</h3>
				<form id="form" method="GET">
				<fieldset>
				<legend>检索选项</legend>
				<input type="text" name="key" value="<?= $key?>" /><input type="submit" value="查询" />
				输入Surname/姓 或者 National identity/身份证编号
				</fieldset>
				</form>
			</div>
			
			<div id="box">
				<h3>检索结果</h3>
			  <table width="100%">
				<thead>
				  <tr>
					<th>NO.</th>
					<th>Surname Firstname</th>
					<th>National ID</th>
					<th>Gender</th>
					<th>Birthday</th>
					<th>Action</th>
				  </tr>
				</thead>
				<tbody>
				<?php
				  $alt = true; 
				  foreach($lists as $item):
					$alt = !$alt;
				?>
				  <tr class="<?= ($alt)?'odd':'even'?>">
					<td><?= $item->id?></td>
					<td><a href="<?=site_url('archive/idcard/'.$item->id)?>"><?= $item->surname?> <?= $item->firstname?></a></td>
					<td class="nowrap"><?= $item->national_id?></td>
					<td><?= ($item->sex==1)?'Male/男':'Female/女'?></td>
					<td><?= $item->birth_y?>-<?= $item->birth_m?>-<?= $item->birth_d?></td>
					<td>
						<a href="<?=site_url('archive/idcard/'.$item->id)?>"><img src="images/icons/user.png" title="Show profile" width="16" height="16" /></a>
						<a href="<?=site_url('archive/idcard/'.$item->id)?>"><img src="images/icons/user_edit.png" title="Edit user" width="16" height="16" /></a>
						<!--<a href="<?=site_url('archive/idcard/'.$item->id)?>" onclick="return confirmLink(this, '删除这条客户的信息？删除后将不可恢复！')"><img src="images/icons/user_delete.png" title="Delete user" width="16" height="16" /></a>-->
					</td>
				  </tr>
				  <?php endforeach;?>
				</tbody>
			  </table>
			  
			  <div id="pager" align="right">[<?= $page ?>]</div>
			</div>
			
		</div>
		<div id="sidebar">
			<ul>
				<li>
					<h3><a class="search">Search</a></h3>
					<ul>
						<li>Search说明</li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
	
<script type="text/javascript">
/**
$(function() {
	$("td[href]").click( function(){
		window.location.href=$(this).attr('href');
	}); 
})
*/
function confirmLink(theLink, theMsg)
{
    var is_confirmed = confirm(theMsg);
	/*
    if (is_confirmed) {
        if ( typeof(theLink.href) != 'undefined' ) {
            theLink.href += '&is_js_confirmed=1';
        } else if ( typeof(theLink.form) != 'undefined' ) {
            theLink.form.action += '?is_js_confirmed=1';
        }
    }
	*/
    return is_confirmed;
}
</script>
<?=$this->load->view('include_footer',null)?>



